﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;

namespace YJKArch.ImportStructureProject.ImportObjects
{
	public class FloorInfos : ObjectInfos
	{
		public List<EdgeInfos> LoopEdges
		{
			get
			{
				return this.m_LoopEdges;
			}
		}

		public double Thickness
		{
			get
			{
				return this.m_Thickness;
			}
		}

		public double TopElevation
		{
			get
			{
				return this.m_LoopEdges[0].StartPoint.Z + this.Thickness;
			}
		}

		public List<FloorHoleInfos> Holes
		{
			get
			{
				return this.m_Holes;
			}
		}

		public FloorInfos(FloorInfos rhs)
		{
			this.m_OldElementId = rhs.m_OldElementId;
			this.m_LoopEdges = rhs.m_LoopEdges;
			this.m_Holes = rhs.m_Holes;
			this.m_Thickness = rhs.m_Thickness;
		}

		public FloorInfos(ElementId oldElementId, List<EdgeInfos> loopEdges, List<FloorHoleInfos> holes, double thickness)
		{
			this.m_OldElementId = oldElementId;
			this.m_LoopEdges = loopEdges;
			this.m_Holes = holes;
			this.m_Thickness = thickness;
		}

		private List<EdgeInfos> m_LoopEdges = new List<EdgeInfos>();

		private List<FloorHoleInfos> m_Holes = new List<FloorHoleInfos>();

		private double m_Thickness;
	}
}
